{%extends 'template.html'%}

{%block content%}
<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">{{head.value}}</h1>                
        </div>            
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="btn-group">
                        <a href="/assets/export_logs"><button type="button" class="btn btn-primary">导出</button></a>
                        <a><button id='bt-search' type="button" class="btn btn-primary">高级搜索</button></a>
                        <a><button id='bt-showdel' type="button" class="btn btn-primary">删除</button></a>
                    </div>                    
                </div>
                <div class="panel-body">
                        <div id="div-search" class="hide">
                          <table id="high-search" style="width: 67%; margin: 0 auto 2em auto;" border="0" cellpadding="3" cellspacing="0">
                            <thead>
                                <tr>
                                    <th>目标</th>
                                    <th>内容</th>
                                    <th>正则表达式</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr id="filter_global">
                                    <td>全局</td>
                                    <td align="center"><input style="width:100%" class="global_filter" id="global_filter" type="text"></td>
                                    <td align="center"><input class="global_filter" id="global_regex" type="checkbox"></td>
                                </tr>
                                <tr id="filter_col0" data-column="0">
                                    <td>用户</td>
                                    <td align="center"><input style="width:100%" class="column_filter" id="col0_filter" type="text"></td>
                                    <td align="center"><input class="column_filter" id="col0_regex" type="checkbox"></td>
                                </tr>
                                <tr id="filter_col1" data-column="1">
                                    <td>操作时间</td>
                                    <td align="center"><label >开始</label><input id="filter_start" type="text"><br/><label>结束</label><input id="filter_end" type="text"></td>
                                    <td align="center"></td>
                                </tr>
                                <tr id="filter_col2" data-column="2">
                                    <td>操作对象</td>
                                    <td align="center"><input style="width:100%" class="column_filter" id="col2_filter" type="text"></td>
                                    <td align="center"><input class="column_filter" id="col2_regex" type="checkbox"></td>
                                </tr>
                                <tr id="filter_col3" data-column="3">
                                    <td>操作类型</td>
                                    <td align="center"><input style="width:100%" class="column_filter" id="col3_filter" type="text"></td>
                                    <td align="center"><input class="column_filter" id="col3_regex" type="checkbox"></td>
                                </tr>
                                <tr id="filter_col4" data-column="4">
                                    <td>执行结果</td>
                                    <td align="center"><input style="width:100%" class="column_filter" id="col4_filter" type="text"></td>
                                    <td align="center"><input class="column_filter" id="col4_regex" type="checkbox"></td>
                                </tr>
                                <tr id="filter_col5" data-column="5">
                                    <td>备注</td>
                                    <td align="center"><input style="width:100%" class="column_filter" id="col5_filter" type="text"></td>
                                    <td align="center"><input class="column_filter" id="col5_regex" type="checkbox"></td>
                                </tr>
                            </tbody>
                          </table>
                        </div>
                        <div id='div-del' class="hide">
                          <div class="alert alert-info">
                            <p>提示：删除时间在搜索显示时会覆盖高级搜索</p>
                          </div>
                          <table style="width: 67%; margin: 0 auto 2em auto;" border="0" cellpadding="3" cellspacing="0">
                            <thead>
                                <tr>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                              <tbody>
                                <tr>
                                    <td>
                                      <input type="text" class="form-control" placeholder="2015-05-01" id="start_time"><p class="help-block">(当前日期的0点)</p>
                                    </td>
                                    <td>
                                      <input type="text" class="form-control" placeholder="2025-05-01" id="end_time">
                                      <p class="help-block">(当前日期的0点)</p>
                                    </td>
                                    <td>
                                      <button id='bt-del' type="button" class="btn btn-danger">删除</button>
                                      <p class="help-block"></p>
                                    </td>
                                </tr>
                              </tbody>
                            </table>
                        </div>
                      <table id="mytable" class="display" width="100%" cellspacing="0">
                          <thead>
                              <tr>
                                  <th>用户</th>
                                  <th>操作时间</th>
                                  <th>操作对象</th>
                                  <th>操作类型</th>
                                  <th>执行结果</th>
                                  <th style="word-wrap:break-word;word-break:break-all;width: 700px">备注</th>
                              </tr>
                          </thead>                
                      </table>
                </div>
            </div>
            <div class="modal fade" id="Modal-file" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="myModalLabel">导出</h4>
                      </div>
                      <div class="modal-body">
                        <div class="form-group">
                          <label for="exampleInputFile">File input</label>
                          <input type="file" id="exampleInputFile">
                          <p class="help-block">Example block-level help text here.</p>
                        </div>
                      </div>
                      <div class="modal-footer">
                        <a><button type="button" class="btn btn-default" data-dismiss="modal">关闭</button></a>
                        <a><button id='file-save' type="button" class="btn btn-primary">保存</button></a>
                      </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->          
            </div>
        </div>
    </div>    
</div>
{%endblock%}
{%block bodyjs%}
    <script src="/static/js/jquery.dataTables.js" ></script>
    {{ django_context_varable }}
    {% verbatim %}
    <script id="tpl" type="text/x-handlebars-template">
          {{#each func}}
          <button type="button" class="btn btn-{{this.type}} btn-sm" onclick="{{this.fn}}">{{this.name}}</button>
          {{/each}} 
    </script>
    {% endverbatim %}
    <script src="/static/js/handlebars-v3.0.1.js"></script>
    <script src="/static/js/log.js"></script>
    <script type="text/javascript" src="/static/js/zebra_datepicker.js"></script>
{%endblock%}
{%block css%}
<link href="/static/css/jquery.dataTables.css" rel="stylesheet" type="text/css">
<link href="/static/css/mycss.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/static/css/datetimepicker.css">
{%endblock%}